package com.shoulder.core.enums;

public enum StatusEnums {
    active(1, "正常"),
    disabled(0, "禁用");

    private final int code;
    private final String desc;

    StatusEnums(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }



    public static StatusEnums getEnum(int code) {
        for (StatusEnums e : StatusEnums.values()) {
            if (e.getCode() == code) {
                return e;
            }
        }
        return null;
    }
}
